package de.metalcon.gwt.client.mainDesign;

import com.google.gwt.user.client.ui.FlowPanel;

import de.metalcon.gwt.client.Metalcon;

public class MainPanel extends FlowPanel {
	FlowPanel contentContainer = new FlowPanel();
	MainContent content;

	public MainPanel() {
		this.setStyleName(Metalcon.getBundle().css().mainPanel());

		FlowPanel mainContainer = new FlowPanel();
		mainContainer.addStyleName(Metalcon.getBundle().css().mainContainer());

		MainHeader header = new MainHeader();
		mainContainer.add(header);

		mainContainer.add(contentContainer);

		MainFooter footer = new MainFooter();
		mainContainer.add(footer);
		
		add(mainContainer);
	}

	public void setContent(MainContent c) {
		contentContainer.clear();
		contentContainer.add(c);
		this.content = c;
	}
}